package com.hice.demo.sbdbra.listener;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @author 翟永超
 * @create 2016/9/25.
 * @blog http://blog.didispace.com
 */
@Component
public class Receiver {

    @JmsListener(destination = "sample.queue")
    public void receiveQueue(String text) {
        System.out.println("queue=" + text);
    }

    @JmsListener(destination = "sample.topic")
    public void receiveTopic(String text) {
        System.out.println("topic=" + text);
    }
}
